home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_12_10
/
allison
/
demodel.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
1994-09-06
|
344b
|
27 lines
LISTING 10
#include <iostream.h>
class T
{
public:
T() {cout << "Default constructor" << endl;}
~T(){cout << "Destructor" << endl;}
};
main()
{
T *p = new T[3];
delete [] p;
return 0;
}
/* Output:
Default constructor
Default constructor
Default constructor
Destructor
Destructor
Destructor
*/